<template>
  <div>
    <el-button type="text" @click="logout">
      <a>退出登录</a>
    </el-button>

  </div>

</template>

<script>
export default {
  name: "Logout",
  methods: {
    logout(){
      let self = this
        window.localStorage.removeItem('user')
        self.$router.push({path: '/'})
    }
  }
}

</script>

<style scoped>

</style>
